package site.teamo.biu.net.common.web.exchange.service;

import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.service.annotation.GetExchange;
import org.springframework.web.service.annotation.HttpExchange;
import site.teamo.biu.net.common.http_https_proxy.ConnectionState;
import site.teamo.biu.net.common.web.exchange.model.http_https_proxy_remote_service.GetConnectionRuleResponse;
import site.teamo.biu.tool.core.model.BiuJSONResult;

/**
 * @author haocongshun
 * @date 2023/03/07 14:50:44
 */
@HttpExchange("/api/http-https-proxy-server-service")
public interface HttpHttpsProxyRemoteService {

    @GetExchange("service-check")
    BiuJSONResult<Boolean> serviceCheck(@RequestHeader(name = "Access-Token") String token);

    @GetExchange("/send-heartbeat")
    BiuJSONResult<Boolean> sendHeartbeat(@RequestHeader(name = "Access-Token") String token);

    @GetExchange("/get-http-https-proxy-server-info")
    BiuJSONResult<Integer> getHttpHttpsProxyServerPort(@RequestHeader(name = "Access-Token") String token);

    @GetExchange("/get-proxy-connection-state")
    BiuJSONResult<ConnectionState> getProxyConnectionState(@RequestHeader(name = "Access-Token") String token);

    @GetExchange("/get-connection-rule")
    BiuJSONResult<GetConnectionRuleResponse> getConnectionRule(@RequestHeader(name = "Access-Token") String token);

}
